{*
  Object Pascal simple form manipulation routines
  @Author  Maciej Zagozda (1998-2008)
  @Licence Microsoft Reciprocal License (Ms-RL)
  @Website http://www.codeplex.com/intelitechdelphirtns/
  @Version 2008/04/20 Added documentation support
}

unit FormRoutines;

interface

uses
 Classes,
 ComCtrls,
 Controls,
 Dialogs,
 ExtCtrls,
 Forms,
 Graphics,
 Menus,
 Messages,
 ShellApi,
 StdCtrls,
 SysUtils,
 Windows;


// creates a form from provided string name and returns form's instance

function CreateFormFromName(const strFormName: AnsiString): TForm;

implementation

function CreateFormFromName(const strFormName: AnsiString): TForm;
var
  theFormClass: TFormClass;
begin
  try
    theFormClass := TFormClass(FindClass(strFormName));
    Result := theFormClass.Create(Application);
  except
    Result := nil;
  end;//try
end;


end.
 